import request from '@/utils/request'

// 获取树形数据
export const getDepartmentListAPI = (params) => {
  return request('/company/department')
}

// 获取下拉部门管理员数据
export const getManagerAPI = () => {
  return request('/sys/user/simple')
}

// 新增部门接口
export const getDpmAPI = (data) => {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}

// 部门详情
export const getDpmDetailAPI = (id) => {
  return request('/company/department/' + id)
}

// 编辑部门
export const editDpmAPI = (data) => {
  return request({
    url: '/company/department/' + data.id,
    method: 'put',
    data
  })
}

// 删除部门
export const delDepAPI = (id) => {
  return request({
    method: 'delete',
    url: '/company/department/' + id
  })
}

